/*    */ package com.iris.egrant.grid.utils;
/*    */ 
/*    */

import java.io.Serializable;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class PageContainer
/*    */   implements Serializable
/*    */ {
/*    */   private static final long serialVersionUID = 6234939577965141720L;
/* 17 */   private Integer currentPage = new Integer(1);
/* 18 */   private Integer totalPages = new Integer(1);
/* 19 */   private Integer totalCount = new Integer(0);
/* 20 */   private Integer pageRowCount = new Integer(10);
/*    */   private Grid grid;
/*    */   
/*    */   public PageContainer() {
/* 24 */     this.grid = new Grid();
/*    */   }
/*    */   
/*    */   public Integer getCurrentPage() {
/* 28 */     return this.currentPage;
/*    */   }
/*    */   
/*    */   public void setCurrentPage(Integer currentPage) {
/* 32 */     this.currentPage = currentPage;
/*    */   }
/*    */   
/*    */   public Integer getTotalPages() {
/* 36 */     return this.totalPages;
/*    */   }
/*    */   
/*    */   public void setTotalPages(Integer totalPages) {
/* 40 */     this.totalPages = totalPages;
/*    */   }
/*    */   
/*    */   public Integer getTotalCount() {
/* 44 */     return this.totalCount;
/*    */   }
/*    */   
/*    */   public void setTotalCount(Integer totalCount) {
/* 48 */     this.totalCount = totalCount;
/*    */   }
/*    */   
/*    */   public Integer getPageRowCount() {
/* 52 */     return this.pageRowCount;
/*    */   }
/*    */   
/*    */   public void setPageRowCount(Integer pageRowCount) {
/* 56 */     this.pageRowCount = pageRowCount;
/*    */   }
/*    */   
/*    */   public Grid getGrid() {
/* 60 */     return this.grid;
/*    */   }
/*    */   
/*    */   public void setGrid(Grid grid) {
/* 64 */     this.grid = grid;
/*    */   }
/*    */   
/*    */   public void setTotalPages() {
/* 68 */     if (this.pageRowCount.intValue() != 0) {
/* 69 */       this.totalPages = Integer.valueOf(this.totalCount.intValue() / this.pageRowCount.intValue() + ((this.totalCount.intValue() % this.pageRowCount.intValue() == 0) ? 0 : 1));
/*    */     }
/*    */   }
/*    */   
/*    */   private void add2TotalCount(Integer subTotalCount) {
/* 74 */     this.totalCount = Integer.valueOf(this.totalCount.intValue() + subTotalCount.intValue());
/*    */   }
/*    */   
/*    */   private void add2Grid(Grid gridParam) {
/* 78 */     this.grid.merge(gridParam);
/*    */   }
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */   
/*    */   public static PageContainer merge(PageContainer... pageContainers) {
/* 89 */     if (pageContainers == null) {
/* 90 */       return null;
/*    */     }
/* 92 */     PageContainer includeContainer = new PageContainer();
/* 93 */     for (PageContainer pcer : pageContainers) {
/* 94 */       includeContainer.add2TotalCount(pcer.getTotalCount());
/* 95 */       includeContainer.add2Grid(pcer.getGrid());
/*    */     } 
/* 97 */     return includeContainer;
/*    */   }
/*    */ }


/* Location:              D:\文件kjt\WEB-INF\lib\egrant-core-2.2.20240205.1659.jar!\com\iris\egrant\gri\\utils\PageContainer.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       1.1.3
 */